package com.blz.flare.parser;

import java.net.URI;

/**
 * A parser handles the actual parsing of content.
 */
public interface ContentParser {

    /**
     * Returns true if the parser supports parsing this type of content.
     * @param contentType the contentType
     * @return true if supported
     */
    boolean supports(String contentType);

    /**
     * Returns the result of a parse.
     *
     * @param uri the uri
     * @return the parse result
     * @throws Exception on error
     */
    ParseResult parse(URI uri) throws Exception;
}
